<template>
  <div id="">
    <h3>star组件应用</h3>
     <i class="glyphicon" :class="item" v-for="item in stars" ></i>
  </div>
</template>
<script>
export default {
  props:{
    score:{
     type:Number
},
    size:{
     type:Number
}
},
data(){
 return {
   stars:[]
}
},
 mounted() {
   let arr = []
   for (let i = 0; i < this.score; i++) {
      arr.push('glyphicon-star')
   }
   for (let i = 0; i < 5- this.score; i++) {
      arr.push('glyphicon-star-empty')
   }
   console.log(arr)
   console.log(this.score)
   this.stars=arr
}
}
</script>
<style scoped>
</style>
